/*
 * @Author: yanyqf
 * @Date: 2020-03-10 14:08:22
 * @LastEditTime: 2020-04-25 22:27:57
 * @Description: file content
 */
import { vendorsGetTId } from 'utils/config.js';
let tenantId;
let cookieStr = document.cookie.split(';').find(cur => cur.indexOf('tenantid=') != -1)
if (cookieStr) {
    tenantId = cookieStr.split('=')[1];
}

export const searchTpl = {
    name: '查询模板',
    col: 4,
    dataSource: 'personnelFiles_search_area',
    items: [
        {
            itemtype: "input",
            refPk: 'name',
            label: "企业名称",
            isMultiSelectedEnabled: false,
            selectShowKey: 'name',
            required: false,
           
        },
        {
            itemtype: "select",
            refPk: 'roles',
            options:[
                {key:10, value:'业主方',label:"业主方"},
                {key:20, value:'施工方',label:"施工方"},
                {key:30, value:'监理方',label:"监理方"},
                {key:40, value:'设计方',label:"设计方"},
                {key:50, value:'客户方',label:"客户方"}
            ],
            label: "企业角色",
            isMultiSelectedEnabled: true,
            required: false,
            selectShowKey: 'label',
        },
        {
            itemtype: "refer",
            refType: 'tree',
            refPk: 'pkSrc',
            label: "组织范围",
            isMultiSelectedEnabled: true,
            required: false,
            selectShowKey: 'sname',
            isNeedRoot : false,
            reqRef: {
                queryCondition: function () {

                    return { pkTenant: tenantId }
                },
                method: 'post',
                refUrl: "/organization/getOrgByTenantId",
            },
        },
    ]
}